<div id="dashboard" role="navigation">
  <ul role="navigation">
    <li><%= span_if_current ts("Dashboard"), @collection %></li>
    <li><%= span_if_current ts("Profile"), collection_profile_path(@collection) %></li>
    <% if !@collection.collection_profile.faq.blank? %>
      <li><%= span_if_current ts("FAQ"), collection_profile_path(@collection, :anchor => "faq") %></li>
    <% end %>
    <% if !@collection.collection_profile.rules.blank? %>
      <li><%= span_if_current ts("Rules"), collection_profile_path(@collection, :anchor => "rules") %></li>
    <% end %>
  
    <% if @collection.parent %>
      <li><%= link_to ts("Parent Collection"), collection_path(@collection.parent) %></li>
    <% else %>
      <li><%= span_if_current ts("Subcollections (%{count})", :count => @collection.children.count), collection_collections_path(@collection) %></li>
    <% end %>
    
    <% if @collection.challenge %>
  	  <%= render :partial => "challenge/#{challenge_class_name(@collection)}/challenge_sidebar" %>
  	<% end %>

    <li><%= span_if_current ts("Fandoms (%{count})", :count => @collection.all_fandoms_count), collection_fandoms_path(@collection) %></li>

    <li><%= span_if_current ts("Works (%{count})", :count => @collection.all_approved_works_count), collection_works_path(@collection) %></li>

    <li><%= span_if_current ts("Bookmarks (%{count})", :count => @collection.all_approved_bookmarks_count), collection_bookmarks_path(@collection) %></li>

    <li>
      <% if controller.controller_name == 'collections' && controller.action_name == 'show' %>
      <%= link_to 'Random Items', 
        :url => collection_path(@collection, :show_random => true), :method => :get, :remote => true %>  
      <% else %>  
      <%= link_to 'Random Items', collection_path(@collection, :show_random => true) %>
      <% end %>
    </li>
    <li><%= span_if_current ts("People"), collection_people_path(@collection) %></li>
    <li><%= span_if_current ts("Tags"), collection_tags_path(@collection) %></li>
  
    <% if @collection.user_is_owner?(current_user) %>
      <% if @collection.challenge %>
        <li><%= link_to ts("Challenge Settings"), eval("edit_collection_#{challenge_class_name(@collection)}_path(@collection)") %></li>
    	<% end %>
  	  <li><%= span_if_current ts("Settings"), edit_collection_path(@collection) %></li>
    <% end %>
  </ul>
</div>

